<?php require VIEW_ROOT.'/common/header.php'?>

<div class="info">
	<a href="./?m=tasks&a=form">添加计划任务</a>
</div>

<table>
	<tr>
		<th width="30">ID</th>
		<th width="250">任务名称</th>
		<th width="100">执行时间</th>
		<th width="120">最后执行时间</th>
		<th width="80">今天</th>
		<th>触发URL</th>
		<th width="40">状态</th>
	</tr>
	<?php foreach ($res as $row) {?>
		<tr>
			<td><?php echo $row['task_id']?></td>
			<td class="frm"><?php echo $row['name']?></td>
			<td><?php echo substr(intval($row['time']/60) + 100, 1).':'.substr($row['time']%60 + 100, 1)?></td>
			<td><?php echo date('m/d H:i:s', $row['last_executed'])?></td>
			<td><?php echo $row['last_executed'] >= strtotime(date('Y-m-d')) + $row['time'] ? '已执行' : '…'?></td>
			<td class="frm"><?php echo $row['url']?></td>
			<td><?php echo $row['enable']?></td>
		</tr>
	<?php }?>
</table>

<?php require VIEW_ROOT.'/common/footer.php'?>